import { Link } from 'umi';
import { Layout, Menu, Breadcrumb } from 'antd';

export default function BasicLayout({ children }) {
  const { Header, Content, Footer } = Layout;
  const {
    props: {
      location: { pathname },
    },
  } = children;

  return (
    <Layout className="layout">
      <Header>
        <Menu theme="dark" mode="horizontal" defaultSelectedKeys={['1']}>
          <Menu.Item key="1">
            <Link to="/">index</Link>
          </Menu.Item>
          <Menu.Item key="2" onClick="">
            <Link to="/employee">list</Link>
          </Menu.Item>
        </Menu>
      </Header>
      <Content style={{ padding: '0 51px' }}>
        <div style={{ height: '550px' }}>{children}</div>
      </Content>
      <Footer style={{ textAlign: 'center' }}>
        Ant Design ©2021 Created by zyy
      </Footer>
    </Layout>
  );
}
